﻿using MediatR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebMediaTRApi.Services;
using WebMediaTRApi.WeatherForcasts.Querys;

namespace WebMediaTRApi.WeatherForcasts.Handlers
{
    public class TodayWeatherForecastQueryHandler : RequestHandler<Weather_TodayQuery, WeatherForecast>
    {
        private readonly WeatherForecastService _service;

        public TodayWeatherForecastQueryHandler(WeatherForecastService service)
        {
            _service = service;
        }
  

        protected override WeatherForecast Handle(Weather_TodayQuery request)
        {
           return _service.GetWeatherToday();
        }
    }
}
